<?php
class Delivery_Model_DbTable_ActionsLog
	extends Delivery_Model_DbTable_Abstract

{
	protected $_name = 'log_actions';
	protected $_primary = 'idLog';

	public function insert( $actionLog ){
		
		return parent::insert(	
			$this->_fecha( $this->_getData( $actionLog ), true, false )
		);	
	}
	
	protected function _getData( $actionLog )
	{
		return  array (
			'controller'=> $actionLog->controller,
   			'action'	=> $actionLog->action,	   			
   			'userId'	=> $actionLog->userId,	   			
			'ip'		=> new Zend_Db_Expr("INET_ATON('$actionLog->ip')")
   		);
	}  

}